<?php if(!defined('BASEPATH')) exit('No direct script access allowed');if(!function_exists('script_tag')){function script_tag($src = '',$language ='javascript',$type='text/javascript',$index_page=FALSE){$CI=&get_instance();$script='<script ';if(is_array($src)){foreach($src as $v){if($k=='src' AND strpos($v,'://')===FALSE){if($index_page===TRUE){$script.='src="'.$CI->config->site_url($v).'"';}else{$script.='src="'.$CI->config->slash_item('base_url').$v.'"';}}else{$script.="$k=\"$v\"";}}$script.=">";}else{if(strpos($src,'://')!==FALSE){$script.='src="'.$src.'"';}else if($index_page===TRUE){$script.='src="'.$CI->config->site_url($src).'"';}else{$script.='src="'.$CI->config->slash_item('base_url').$src.'"';}$script.=' language="'.$language.'" type="'.$type.'"';$script .= '>';}$script .= '</script>';return $script;}}?>